package com.atguigu.yygh.host.utils;

import java.util.*;
import java.util.stream.Collectors;

/**
 * @author DongYu Zhou
 * @date 2022/6/27 10:49
 */
public class TestMap {

    public static void main(String[] args) {
        HashMap<String, Object> hashMap = new HashMap<>();

        hashMap.put("小龙女", "杨过");
        hashMap.put("张三丰", "郭襄");




        List<String> strings = new ArrayList<>();
        strings.add("小龙女");
        strings.add("杨过");
        strings.add("张三丰");
        strings.add("郭襄");

//        for (String string : strings) {
//            System.out.println("string = " + string);
//        }
//        strings.stream().forEach(System.out::println);



//        hashMap.entrySet().stream().forEach(i->{
//            System.out.println("i = " + i);
//        });
  //     hashMap.entrySet().stream().forEach(System.out::println);

//        for (Map.Entry<String, Object> stringObjectEntry : hashMap.entrySet()) {
//            System.out.println("stringObjectEntry = " + stringObjectEntry);
//        }

    }
}
